<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
    <title>拾光&nbsp;•&nbsp;失物招领</title>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection"content="telephone=no, email=no" />
    <meta name="renderer" content="webkit">

    <meta name="title" content="拾光&nbsp;•&nbsp;失物招领" />
    <meta name="img" content="http://source.timepicker.cn/uploads/default/laf.png-120" />
    <meta name="description" content="不管是捡了东西还是丢了东西都来这里看看吧" />
    
    <!--icon-->
    <link rel="shortcut icon" href="http://source.timepicker.cn/uploads/default/laf.png-120" />
    <!--拾光css-->
    <link rel="stylesheet" href="http://source.timepicker.cn/static/css/ptime_v0.4.min.css">
    <!-- 小应用css -->
    <link rel="stylesheet" href="/css/style.css">
    <!-- animate css -->
    <link rel="stylesheet" href="http://source.timepicker.cn/static/css/animate.min.css">
    <!--主题css-->
    <style type="text/css">
      a{color: #333;}   /* 未访问的链接 */
      .active{color:#a8c0d8 !important; border-color: #a8c0d8 !important;}
      nav ul li a.current{color: #a8c0d8;border-color: #a8c0d8;}
      .mcolor{color: #a8c0d8;}
      .bg-mcolor{background-color: #a8c0d8 !important;}
      .button.mcolor{border-color:#a8c0d8;}
      .button.mcolor.active{background-color: #a8c0d8;}
      .label.current{background-color: #a8c0d8;}
      #top-a{background-color: #a8c0d8;}
    </style>
</head>

<body class="agent-{{ua}}">
    <!--头部-->
    <header class="bg-mcolor fixed top" >
        <h1>拾光&nbsp;•&nbsp;失物招领</h1>
        <span class="button top-right white" onclick="share()">分享</span>
    </header>
    <!--导航-->
    <nav class="clearfix fixed bottom">
        <div class="tab">
          {{#if result.type}}
            <div class="tab-item">
              <a href="/laf/lost">
                <div class="center logo"><i class="web-font">丢</i></div>
              </a>
            </div>
            <div class="tab-item">
              <a href="/laf/found">
                <p class="center logo current"><i class="web-font">捡</i></p>
              </a>
            </div>
          {{else}}
          <div class="tab-item">
            <a href="/laf/lost">
              <div class="center logo current"><i class="web-font">丢</i></div>
            </a>
          </div>
          <div class="tab-item">
            <a href="/laf/found">
              <p class="center logo"><i class="web-font">捡</i></p>
            </a>
          </div>
        {{/if}}
          <div class="tab-item">
            <a href="/laf/tagPage?type={{@root.result.type}}">
              <p class="center logo"><i class="web-font">搜</i></p>
            </a>
          </div>
          <div class="tab-item">
            <a href="/laf/me">
              <p class="center logo"><i class="web-font">我</i></p>
            </a>
          </div>
          <div class="tab-item">
            <a href="/laf/addPage">
              <p class="center logo"><i class="web-font">发</i></p>
            </a>
          </div>
        </div>
    </nav>
    <!--其他区域-->
    <section>
      {{#each result.list}}
        {{#if isMine}}
          <div class="lafitem lafitem-me mcolor" id="{{this._id}}">
        {{else}}
          <div class="lafitem" id="{{this._id}}">
        {{/if}}
          <a href="/laf/detail/{{this._id}}">
            {{#if images.length}}
              <img class="image" src="{{image}}">
            {{/if}}
            <p class="title">{{title}}</p>
            <p class="content-list"><i class="icon iconfont">&#xe61c;</i> {{time}}</p>
            <p class="content-list"><i class="icon iconfont">&#xe630;</i> {{position}}</p>
            <div class="clear"></div>
          </a>
        </div>
      {{/each}}
    </section>
    <div class="center loading"><img src="/image/loading.gif"></div>
    <!-- 分享 -->
    <div id="share-box">
     <div id="share-top-box">
        <h4>分享至：</h4>   
        <div class="bdsharebuttonbox">
          <a href="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
          <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
          <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
        </div>
     </div>
    </div>
    <div id="toast-box" ></div>
    <!--拾光js-->
    <script type="text/javascript" src="http://source.timepicker.cn/static/js/ptime_v0.4.min.js"></script>
    <script type="text/javascript">
      // 网页分享
      if ('{{ua}}' == 'other') {
        var img_url = '';
        if ($('meta[name="img"]')[0].content) {
            img_url = $('meta[name="img"]')[0].content;
        }else{
            img_url = typeof($('img')[0])!='undefined'?$('img')[0].src:$('link[rel="shortcut icon"]')[0].href;
        };
        window._bd_share_config = {
            common : {
                bdText : $('meta[name="title"]')[0].content, 
                bdDesc : $('meta[name="description"]')[0].content, 
                bdUrl  : window.location.href,   
                bdPic  : img_url
            },
            share : [{
                "bdSize" : 24
            }]
        }
        with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
      }

      // 拓展zeptojs
      (function($){
        $.extend($.fn, {
          animateCss: function (animationName) {
            var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
            $(this).addClass('animated ' + animationName).one(animationEnd, function() {
                $(this).removeClass('animated ' + animationName);
            });
          },
          prehandler: {
            touchstartPos: 0, 
            touchendPos: 0,
            handler: function (event) {
              // Object.getOwnPropertyNames(event).sort().forEach(function (val) {console.log(val, '\n')}); // 打印js所有属性列表的方法
              if (event.type == 'touchstart') {
                this.touchstartPos = event.targetTouches[0].screenY
                return false
              } else if (event.type == 'touchend') {
                this.touchendPos = event.changedTouches[0].screenY 
                return this.touchstartPos == this.touchendPos
              }
              return true
            }
          }
        })
      })(Zepto);
    </script>

    <script type="text/javascript" src="/js/index.js"></script>

    <script type="text/javascript">
      autoLoadMore ('{{isApp}}', '{{ua}}', {{result.type}}, '{{result.token}}')
    </script>
</body>
</html>